import java.io.File;

/**
 * @Author: wenjingyuan
 * @Date: 2023/05/27/19:20
 * @Description:
 */
public class FileDemo1 {
    public static void main(String[] args) {

        //构造方法1
        File pFile=new File("d:\\");
        File file=new File(pFile,"a.txt");
        System.out.println(file.getPath());
        //构造方法2(重要)
        File file1=new File("d:\\b.txt");
        System.out.println(file1.getPath());
        //构造方法3
        File file2=new File("d:\\","c.txt");
        System.out.println(file2.getPath());
    }
}
